// @ts-ignore

 
import { api } from '@/utils/api';

/** 下载模板 POST /proDataCostYear/download/template */
export async function proDataCostYearDownloadTemplate(
  options?: ArgumentsType<typeof api>[1]
): Promise<any>;

export async function proDataCostYearDownloadTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<any>>;

export async function proDataCostYearDownloadTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<any>;

export async function proDataCostYearDownloadTemplate(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<any>(`/app/proDataCostYear/download/template`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<any>(`/app/proDataCostYear/download/template`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 导入数据 POST /proDataCostYear/import */
export async function proDataCostYearImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BIZAPI.proDataCostYearImportParams,
  body: {},
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function proDataCostYearImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BIZAPI.proDataCostYearImportParams,
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function proDataCostYearImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BIZAPI.proDataCostYearImportParams,
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function proDataCostYearImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BIZAPI.proDataCostYearImportParams,
  body: {},
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/proDataCostYear/import`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      params: {
        ...params
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/proDataCostYear/import`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    params: {
      ...params
    },
    data: body,
    ...(options || {})
  });
}

/** 获取年成本列表 POST /proDataCostYear/list */
export async function proDataCostYearList(
  body: BIZAPI.ProDataCostYearQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultListProDataCostYearEntity>;

export async function proDataCostYearList(
  body: BIZAPI.ProDataCostYearQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultListProDataCostYearEntity>>;

export async function proDataCostYearList(
  body: BIZAPI.ProDataCostYearQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultListProDataCostYearEntity>;

export async function proDataCostYearList(
  body: BIZAPI.ProDataCostYearQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultListProDataCostYearEntity>(`/app/proDataCostYear/list`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultListProDataCostYearEntity>(`/app/proDataCostYear/list`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 保存年成本 POST /proDataCostYear/save */
export async function proDataCostYearSave(
  body: BIZAPI.ProDataCostYearEntity[],
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataCostYearSave(
  body: BIZAPI.ProDataCostYearEntity[],
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataCostYearSave(
  body: BIZAPI.ProDataCostYearEntity[],
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataCostYearSave(
  body: BIZAPI.ProDataCostYearEntity[],
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataCostYear/save`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataCostYear/save`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
